Ext.define('TS.lib.form.Date', {
    extend: 'Ext.form.field.Date',
    alias : 'widget.date',
	anchor: '95%',
	allowBlank:true,
	format:CONST.format.date,
	applyListeners:function(){
		var match = Util.attrMatch(this.initialConfig,'on%',['onChange']);// O CO KAMAN?? mój (unsetowany) )onChange ma inne atrybuty!!!!!
		for(x in match){
			this.on(x.substr(2).toLowerCase(),match[x]);
		}
		//this.initialConfig.onSelect && this.on('select',this.initialConfig.onSelect);
		//this.initialConfig.onChange && this.on('change',this.initialConfig.onChange);
	},
	initComponent:function(){
		// - it s a kind of magic
		this.applyListeners();
		this.callParent(arguments);
		
		this.emptyText = this.initialConfig.empty;
		
		
	}
});